def mul(*x):
    if len(x) == 0:
        raise TypeError("！")
    a = 1
    for y in x:
        a = a * y
    return a


print(mul(1, 2, 3))


def move(n,a,b,c):
    if n == 1:
        print(a,"--->",c)
    else:
        move(n-1,a,c,b)
        move(1,a,b,c)
        move(n-1,b,a,c)
move(3,'A','B','C')
a = ' ahsjkdh '
print(a[1:3])

def trim(s):
    if s[0] == ' ':
        if s[len(s) - 1] == ' ':
            return s[1:len(s) - 1]
        else:
            return s[1:len(s)]
    else:
        if s[len(s) - 1] == ' ':
            return s[0:len(s) - 1]
        else:
            return s[0:len(s)]


print(trim(' hello a'))

def findMinAndMax(L):
    min = L[0]
    max = L[0]
    for a in L:
        if a > max:
            max = a
        elif a < min:
            min = a
    return max, min


print(findMinAndMax([1, 2, 3]))